<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
     <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html>

<html lang="zh">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
        <meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link href="${path}/statics/weui/style/weui.css" rel="stylesheet"/>
		<link href="${path}/statics/weui/style/weui2.css" rel="stylesheet"/>
		<link href="${path}/statics/weui/style/weui3.css" rel="stylesheet"/>
<title>注册</title>
</head>
<body >
  <form id="form1"  action="${path}/Tests/save">
  <div class="weui_cells weui_cells_form">
        <div class="weui_cell" id="dName">
            <div class="weui_cell_hd"><label class="weui_label">微信名称</label></div>
            <div class="weui_cell_bd weui_cell_primary">
                <input class="weui_input" type="tel" name="openId" id="name" required pattern="[0-9a-zA-Z]{11}" maxlength="11" placeholder="输入你现在的openid" emptyTips="请输入微信openid" notMatchTips="请输入微信openid">
            </div>
            <i id="iconWarn"></i>
            <div class="weui_cell_ft">
                <i class="weui_icon_warn"></i>
            </div>
        </div>
        <!-- <div class="weui_cell">
            <div class="weui_cell_hd"><label class="weui_label">微信openid</label></div>
            <div class="weui_cell_bd weui_cell_primary">
                <input class="weui_input" type="tel" name="openId" id="dName" required pattern="[0-9]{11}" maxlength="11" placeholder="输入你现在的手机号" emptyTips="请输入手机号" notMatchTips="请输入正确的手机号">
            </div>
            <div class="weui_cell_ft">
                <i class="weui_icon_warn"></i>
            </div>
        </div> -->
        <div class="weui_cell weui_vcode">
            <div class="weui_cell_hd"><label class="weui_label">微信</label></div>
            <div class="weui_cell_bd weui_cell_primary">
                <input class="weui_input" type="number" required 
                       placeholder="点击验证码更换" tips="请输入验证码" 
                       
                       >
            </div>
            <div class="weui_cell_ft">
                <i class="weui_icon_warn"></i>
                <a href="javascript:;" class="weui-vcode-btn">获取验证码</a>
            </div>
        </div>
    </div>
         <a href="javascript:;" class="weui_btn weui_btn_primary" onclick="return subForm();">确认</a>
        </form>
        <script type="text/javascript">
        function subForm(){
      	  var name = document.getElementById("name").value;
      	  dName = document.getElementById("dName"),
      	  dName.className = "weui_cell";
      	  iconWarn.className = "";
      	  if(name == "" || name == null || name.length==0){
      	      dName.className=dName.className+" weui_cell_warn";
      	      iconWarn.className ="weui_icon_warn";
      	      iconWarn.text="请输入姓名";
      		  return false;
      	  }
      	  document.getElementById("form1").submit();
        }
        </script>
</body>
</html>